home *** CD-ROM | disk | FTP | other *** search
- ' This simple macro prompts users for the name of a datafile in the
- ' DesignCAD directory, opens the file, and plots circles and text
- ' labels at the XYZ points contained in the file
- '
- ' There is no error trapping for an existing filename, so be sure the
- ' file is under the DesignCAD directory, and don't forget the EXT(.xyz)
- '
- ' Open the Data file, (*\ denotes the DesignCAD directory).
- open "i", 1, "*\Sample Macros\test.xyz"
- ' Read Value pairs from the file until the entire file has been read
- Do while NOT EOF(1)
- ' Read Placeholder text
- input #1, name$
- ' Read XYZ Data line
- input #1, datax, datay, dataz
- ' Draw Circle
- >Circle4
- {
- <PointXYZ [datax, datay, dataz]
- <Type 0
- <Radius 5.0000
- }
- ' Draw the text Placeholder
- >Text2D
- {
- <Style 0
- <Justification 0
- <Size 10
- <Angle a
- <Text [name$]
- <type 0
- <PointXYZ [datax + 5, datay, dataz]
- }
- Loop
- ' Close the Data file
- Close #1
- ' Fit Drawing to the Window
- >FitToWindow
- {
- }
- End
-